package cc.comac.mom.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.QualityProgressExplainService;
import cc.comac.mom.bean.QualityProgressExplain;
import cc.comac.mom.bean.base.LimitPageBean;
import cc.comac.mom.datahandlers.entity.QualityProgressExplainDataHandler;
import cc.comac.mom.entity.QualityProgressExplainEntity;
import cc.comac.mom.util.ResultBean;

@Service
@RestController
public class QualityProgressExplainServiceImpl implements QualityProgressExplainService {
	
	@Autowired
	private QualityProgressExplainDataHandler qualityProgressExplainDataHandler;

	@Override
	public ResultBean insert(@RequestBody QualityProgressExplain obj) {
		// TODO Auto-generated method stub
		return qualityProgressExplainDataHandler.insert(obj);
	}

	@Override
	public ResultBean selectByCondition(@RequestBody QualityProgressExplain obj) {
		ResultBean resultBean = new ResultBean(true);
		LimitPageBean<QualityProgressExplainEntity> limitPageBean = qualityProgressExplainDataHandler.selectByCondition(obj);
		resultBean.setObject(limitPageBean);
		return resultBean;
	}

}
